class CreateComments < ActiveRecord::Migration
  def self.up
    create_table :comments do |t|
      t.integer :book_id, :null => false, :options =>
        "CONSTRAINT fk_comment_books REFERENCES books(id)"
      t.string :book_title
      t.string :user_name
      t.text :comment

      t.timestamps
    end
  end

  def self.down
    drop_table :comments
  end
end
